package com.scenic.rd_android.testview;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewStub;
import android.widget.Toast;

import com.nova.scenic.projectlibs.util.BaseActivity;
import com.scenic.rd_android.R;

/**
 * 布局一些优化的操作
 */
public class TestLayoutOptimisesActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test_include_flag);
    }


    public void showHideView(View view){
        ViewStub stubView = (ViewStub) findViewById(R.id.id_viewStub_test1);
        if(stubView != null){
            View inflateView = stubView.inflate();
            inflateView.findViewById(R.id.tabHost).setVisibility(View.VISIBLE);
            inflateView.findViewById(R.id.button4).setVisibility(View.VISIBLE);
        }else {
            Toast.makeText(this,"stubView is null",Toast.LENGTH_LONG).show();
        }
    }

}
